<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.goodfox.com/jsp/tags/power" prefix="p"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<script type="text/javascript">
function functionModifySubmit(formObj){
	$("#fun_modify_funScopeName").val($("#fun_modify_funScope").find("option:selected").text());
	$("#fun_modify_funUseName").val($("#fun_modify_funUse").find("option:selected").text());
	$("#fun_modify_funStateName").val($("#fun_modify_funState").find("option:selected").text());
	return validateCallback(formObj,navTabAjaxDone);
}
</script>
<div class="pageContent" style="border-left: 1px solid #B8D0D6;border-right: 1px solid #B8D0D6;">
	<div class="panelBar">
		<ul class="toolBar">
			<li><span><spring:message code="search.lnkGoModify"/>${fun.funName}</span></li>
			<li class="line">line</li>
        	<c:if test="${p:isPower('/function/functionRemove.shtml',sessionScope.loginAccount)}">
			<li><a class="delete" href="<c:url value="/function/functionRemove.shtml"/>?funId=${fun.funId}" target="ajaxTodo" rel="funShowPage"><span><spring:message code="search.btnRemove"/></span></a></li>
			</c:if>
		</ul>
	</div>
    <form id="modifyFunctionFrom" action="<c:url value="/function/functionModify.shtml"/>" method="post" onsubmit="return functionModifySubmit(this);">
    <table class="tableForm" cellpadding="0" cellspacing="1" width="100%" align="center">          
        <tbody>
            <tr>
            	<td>所属功能：</td>
                <td>
                    <input type="hidden" name="fun_modify.funIdParent" id="fun_modify_funIdParent" value="${parentFun.funId}"/>
                    <input type="hidden" name="fun_modify.funGradeParent" id="fun_modify_funGradeParent" value="${parentFun.funGrade}"/>
                    <input type="text" name="fun_modify.funNameParent" id="fun_modify_funNameParent" value="${parentFun.funName}" readonly="readonly"/>
					<a class="btnLook" href="<c:url value="/function/goFunctionParentLookup.shtml"/>" lookupGroup="fun_modify">选择所属功能</a>	
		            <a class="btnClean" href="javascript:;" onclick="$('#fun_modify_funIdParent').val('');$('#fun_modify_funGradeParent').val('');$('#fun_modify_funNameParent').val('');">清空</a>
                </td>
                <td>适用范围：</td>
                <td>
	                <select class="required" name="fun_modify_funScope" id="fun_modify_funScope">
	                	<option value="">--请选择--</option>
	           			<c:forEach items="${scopeList}" var="atrScope">
	           				<option value="${atrScope.atrValue}" <c:if test="${fun.funScope==atrScope.atrValue}">selected="selected"</c:if>>${atrScope.atrName}</option>
	           			</c:forEach>
	           		</select>
	    			<input type="hidden" name="fun_modify_funScopeName" id="fun_modify_funScopeName" value="${fun.funScopeName}"/>
				</td>
            </tr>
            <tr>
                <td>功能名称：</td>
                <td>
                	<input class="required" type="text" name="fun_modify_funName" id="fun_modify_funName" value="${fun.funName}" maxlength="20">
                    <input type="hidden" name="fun_modify_funId" id="fun_modify_funId" value="${fun.funId}"/>
                </td>
                <td>功能编码：</td>
                <td>
                	<input type="text" name="fun_modify_funCode" id="fun_modify_funCode" value="${fun.funCode}" maxlength="20">
                </td>
            </tr>
            <tr>
                <td>使用方式：</td>
                <td>
	                <select class="required" name="fun_modify_funUse" id="fun_modify_funUse">
	                	<option value="">--请选择--</option>
	           			<c:forEach items="${useList}" var="atrUse">
	           				<option value="${atrUse.atrValue}" <c:if test="${fun.funUse==atrUse.atrValue}">selected="selected"</c:if>>${atrUse.atrName}</option>
	           			</c:forEach>
	           		</select>
	    			<input type="hidden" name="fun_modify_funUseName" id="fun_modify_funUseName" value="${fun.funUseName}"/>
	    		</td>
                <td>显示排序：</td>
                <td>
                	<input type="text" name="fun_modify_funSort" id="fun_modify_funSort" value="${fun.funSort}" maxlength="4">
                </td>
            </tr>
            <tr>
                <td>访问路径：</td>
                <td colspan="3">
                	<input type="text" name="fun_modify_funUseUrl" id="fun_modify_funUseUrl" value="${fun.funUseUrl}" maxlength="100">
                </td>
            </tr>
            <tr>
                <td>英文名称：</td>
                <td>
                	<input type="text" name="fun_modify_funNameUs" id="fun_modify_funNameUs" value="${fun.funNameUs}" maxlength="20">
                </td>
                <td>功能值：</td>
                <td>
                	<input type="text" name="fun_modify_funValue" id="fun_modify_funValue" value="${fun.funValue}" maxlength="50">
                </td>
            </tr>
            <tr>
                <td>功能状态：</td>
                <td>
	                <select class="required" name="fun_modify_funState" id="fun_modify_funState">
	                	<option value="">--请选择--</option>
	           			<c:forEach items="${stateList}" var="atrState">
	           				<option value="${atrState.atrValue}" <c:if test="${fun.funState==atrState.atrValue}">selected="selected"</c:if>>${atrState.atrName}</option>
	           			</c:forEach>
	           		</select>
	    			<input type="hidden" name="fun_modify_funStateName" id="fun_modify_funStateName" value="${fun.funStateName}"/>
	    		</td>
                <td colspan="2"></td>
            </tr>
            <tr>
                <td>备注：</td>
                <td colspan="3">
                	<input type="text" name="fun_modify_funRemark" id="fun_modify_funRemark" value="${fun.funRemark}" maxlength="100">
                </td>
            </tr>
        </tbody>
    </table>
		<div class="panelBar">
	        <div class="buttonActive">
        	<c:if test="${p:isPower('/function/functionModify.shtml',sessionScope.loginAccount)}">
	        <div class="buttonContent"><button type="submit"><spring:message code="modify.btnModify"/></button></div>
	        </c:if>
	        </div>
		</div>
    </form>
</div>